let express = require('express');
let router = express.Router();

router.get('/', function (req, res, next) {
    req.session.user = null;
    req.session.role = null;
    req.session.destroy();
    res.clearCookie("user");
    res.clearCookie(global.cookieIndentity);

    delete req.session;
    res.json({"success": true, "logged": true, "message": "退出登录成功！"});

    return;
});

module.exports = router;